using System;

namespace SharpMud.MudLib.SAMPLE.Messaging.Act.BuiltIn.Communication
{
	namespace Tell
	{
		public class ToSender : IActMessage
		{
			#region Private Variables
			private string				_Message;
			private Entities.ICharacter _TellSender;
			private Entities.ICharacter _TellRecipient;
			#endregion
			
			#region Constructors
			private ToSender()
			{}

			public ToSender(Entities.ICharacter tellSender, string message, Entities.ICharacter tellRecipient)
			{
				_Message = message;
				_TellSender = tellSender;
				_TellRecipient = tellRecipient;
			}
			#endregion

			#region Public Properties
			public string Message
			{
				get
				{
					return this._Message;
				}
			}
			public Entities.ICharacter TellSender
			{
				get
				{
					return this._TellSender;;
				}
			}
			public Entities.ICharacter TellRecipient
			{
				get
				{
					return this._TellRecipient;
				}
			}
			#endregion
			
			#region IActMessage Members

			public IActMessageParameter[] Parameters
			{
				get
				{
					return new IActMessageParameter[] {
										new ActMessageParameter("Message",this._Message),
										new ActMessageParameter("TellRecipient",this._TellRecipient),
										new ActMessageParameter("TellSender",this._TellSender)
										};	
				}
			}

			public string ToAbsoluteValue()
			{
				return String.Format("[green]You tell {0} [yellow]\"[#black][white]{1}[#black][yellow]\"[green]",
					this.TellRecipient.GetShortDescription(this.TellSender),
					this.Message);
			}

			#endregion
		}


		public class ToRecipient : IActMessage
		{
			#region Private Variables
			private string				_Message;
			private Entities.ICharacter _TellSender;
			private Entities.ICharacter _TellRecipient;
			#endregion
			
			#region Constructors
			private ToRecipient()
			{}

			public ToRecipient(Entities.ICharacter tellSender, string message, Entities.ICharacter tellRecipient)
			{
				_Message = message;
				_TellSender = tellSender;
				_TellRecipient = tellRecipient;
			}
			#endregion

			#region Public Properties
			public string Message
			{
				get
				{
					return this._Message;
				}
			}
			public Entities.ICharacter TellSender
			{
				get
				{
					return this._TellSender;;
				}
			}
			public Entities.ICharacter TellRecipient
			{
				get
				{
					return this._TellRecipient;
				}
			}
			#endregion
			
			#region IActMessage Members

			public IActMessageParameter[] Parameters
			{
				get
				{
					return new IActMessageParameter[] {
														  new ActMessageParameter("Message",this._Message),
														  new ActMessageParameter("TellRecipient",this._TellRecipient),
														  new ActMessageParameter("TellSender",this._TellSender)
													  };	
				}
			}

			public string ToAbsoluteValue()
			{
				return String.Format("[green]{0} tells you [yellow]\"[#black][white]{1}[#black][yellow]\"[green]",
					this.TellSender.GetShortDescription(this.TellRecipient),
					this.Message);
			}

			#endregion
		}


		public class AnonymouslyToRecipient : IActMessage
		{
			#region Private Variables
			private string				_Message;
			private Entities.ICharacter _TellSender;
			private Entities.ICharacter _TellRecipient;
			#endregion
			
			#region Constructors
			private AnonymouslyToRecipient()
			{}

			public AnonymouslyToRecipient(Entities.ICharacter tellSender, string message, Entities.ICharacter tellRecipient)
			{
				_Message = message;
				_TellSender = tellSender;
				_TellRecipient = tellRecipient;
			}
			#endregion

			#region Public Properties
			public string Message
			{
				get
				{
					return this._Message;
				}
			}
			public Entities.ICharacter TellSender
			{
				get
				{
					return this._TellSender;;
				}
			}
			public Entities.ICharacter TellRecipient
			{
				get
				{
					return this._TellRecipient;
				}
			}
			#endregion
			
			#region IActMessage Members

			public IActMessageParameter[] Parameters
			{
				get
				{
					return new IActMessageParameter[] {
														  new ActMessageParameter("Message",this._Message),
														  new ActMessageParameter("TellRecipient",this._TellRecipient),
														  new ActMessageParameter("TellSender",this._TellSender)
													  };	
				}
			}

			public string ToAbsoluteValue()
			{
				return String.Format("[green]Someone tells you [yellow]\"[#black][white]{0}[#black][yellow]\"[green]",
					//this._Sender.GetShortDescription(this._Recipient),
					this.Message);
			}

			#endregion
		}
	}
}
